<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>homework2</title>
</head>
<body>
    <pre>
        str1=input('')
        str2=input('')
        list1 = list(str1)
        list1.sort()
        list2 = list(str2)
        list2.sort()
        # if list1==list2:
        #     print('True')
        # else:
        #     print('False')
        print(list1==list2)
    </pre>
</body>
</html>